<?php
/**
 * 运费管理
 **/
class openapi_api_params_v1_dly extends openapi_api_params_abstract implements openapi_api_params_interface{

    public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'getdlytype'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'goods_id'=>array('required'=>'false','type'=>'int','name'=>'商品ID'),
            ),
            'setgoodsdlytype'=>array(
                'login_token'=>array('required'=>'true','type'=>'string','name'=>'登录token'),
                'goods_id'=>array('required'=>'true','type'=>'int','name'=>'商品ID'),
                'dt_id'=>array('required'=>'true','type'=>'int','name'=>'运费模板ID'),
            ),
        );

        return $params[$method];
    }

    public function description($method){
        $description = array(
            'getdlytype'=>array(
                'name'        =>'获取运费模板',
                'description' =>'获取运费模板',
            ),
            'setgoodsdlytype'=>array(
                'name'        =>'设置商品运费模板',
                'description' =>'设置商品运费模板',
            ),
        );
        return $description[$method];
    }

}